package Handle;

import java.rmi.RemoteException;

import rmiclient.UserRMI;
import Enum.Period;
import businesslogicservice.UserControllerImpli;

public class CheckPeriodHandle {
	
	Period period;
	
        public CheckPeriodHandle(Period period){
        	this.period=period;
        }
        
       public boolean checkIfOk(){
    	   boolean ifOK=false;
    	   UserControllerImpli user=new UserRMI().getObject();
	       try {
			ifOK= user.CheckPeriod(period);
	     	} 
	       catch (RemoteException e) {
			e.printStackTrace();
		   }    
	       return ifOK;
       }
        

}
